package com.turing.user.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.turing.orm.model.domain.common.BaseDo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;


/**
* @Description 
* @Author livin
* @Date 2022-02-22
*/
@ApiModel(value ="")
@Data
@EqualsAndHashCode(callSuper = false)
@Builder(toBuilder = true)
@Accessors(chain = true)
@AllArgsConstructor
@NoArgsConstructor
public class Role extends BaseDo<Role> {

    @ApiModelProperty(value = "角色id")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "描述")
    @TableField("description")
    private String description;

    @ApiModelProperty(value = "状态 0启用 1停用 2隐藏")
    @TableField("status")
    private Integer status;

    @TableField("created_by")
    private String createdBy;

    @ApiModelProperty(value = "创建者")
    @TableField("created_by_name")
    private String createdByName;

    @ApiModelProperty(value = "创建时间")
    @TableField("created_time")
    private LocalDateTime createdTime;

    @ApiModelProperty(value = "最后更新者")
    @TableField("updated_by")
    private String updatedBy;

    @ApiModelProperty(value = "最后更新时间")
    @TableField("updated_time")
    private LocalDateTime updatedTime;

    @ApiModelProperty(value = "角色名称")
    @TableField("name")
    private String name;

    @TableField("client_permissions")
    private String clientPermissions;

    @ApiModelProperty(value = "父级节点id")
    @TableField("type")
    private Integer type;

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}

